﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class useractivate : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            string id = Request.QueryString["id"];
            //webservice que envia id para activar us
            string respuesta = "1";
            com.bpophotos.www.Service service= new com.bpophotos.www.Service();
           // respuesta= service.ActivateUser(id);
            if (respuesta.Equals("1")) { 
                  string body = "<h1>New Client Registrarion</h1>";
                body = body + "</br>A new client is Active on bpophotos.com";
                body = body + " User ID "+id;
                string from = "newclient@bpophotos.com";
                string to = "newclient@bpophotos.com";
                Utility.sendMail(from, to, "New Client bpophotos.com", body);
                Response.Redirect("Thanks.aspx");
                
            }
           
         
                
                
              
            

        }catch (Exception ex)
        {
            Response.Redirect("Default.aspx");
        
        }
    }
    private string crearXml(string id)
    {
        string sxml = "";
        sxml = "<?xml version=\"1.0\" encoding=\"utf-8\" ?> <datos_activacion><userid>";
        sxml = sxml + id.ToString();
        sxml = sxml + "</userid>";
        sxml = sxml + "</datos_activacion>";
       
        return sxml;
    }
}
